package com.cyl.manager.pms.convert;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import com.cyl.manager.pms.domain.entity.Brand;
import com.cyl.manager.pms.req.BrandReq;
import com.cyl.manager.pms.resp.BrandResp;
import com.cyl.manager.pms.domain.vo.BrandVO;
import org.mapstruct.factory.Mappers;
import java.util.List;
/**
 * 品牌管理  DO <=> DTO <=> VO / BO / Query
 *
 * @author zcc
 */
@Mapper(componentModel = "spring")
public interface BrandConvert  {

    BrandConvert INSTANCE = Mappers.getMapper(BrandConvert.class);

    List<BrandVO> dos2vos(List<Brand> list);

    Brand req2Entity(BrandReq req);
    
    @Mapping(target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Mapping(target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    BrandResp entity2Resp(Brand brand);
    
    List<BrandResp> entityList2RespList(List<Brand> brandList);
    
    BrandReq vo2Req(BrandVO brandVO);
}
